* {
	background-color: #ffffff;
	margin: 0;
	padding: 0;
}
.flex-container {
	display: -webkit-flex;
	display: -moz-flex;
	display: -ms-flex;
	display: flex;
	-webkit-flex-flow: row wrap;
	-moz-flex-flow: row wrap;
	-ms-flex-flow: row wrap;
	flex-flow: row wrap;
	-webkit-justify-content: space-between;
	-moz-justify-content: space-between;
	-ms-justify-content: space-between;
	justify-content: space-between;
	-webkit-align-items: center;
	-moz-align-items: center;
	-ms-align-items: center;
	align-items: center;
}
.flex-item {
	width: 150px;
	border: 1px solid #f00;
	min-height: 1px;
}
.flex-container :nth-child(1) {
	height: 120px;
}
.flex-container :nth-child(2) {
	height: 100px;
}
.flex-container :nth-child(3) {
	height: 40px;
}
.flex-container :nth-child(4) {
	border: 1px solid #0f0;
	height: 200px;
}

@media (max-width:640px) {
	.flex-container {
		-webkit-align-items: flex-start;
		-moz-align-items: flex-start;
		-ms-align-items: flex-start;
		align-items: flex-start;
	}
	.flex-container:nth-child(4) {
		-webkit-order: -1;
		-moz-order: -1;
		-ms-order: -1;
		order: -1;
	}
}